Inheritance Using Contracts & Object

نویسنده

  • Wolfgang Weck
چکیده

Normal class-based code inheritance across component boundaries creates a dependency between the involved components. To avoid this, a speciication of the inherited class must be part of the respective component's contract and the inheriting class must be speciied with reference to this speciication only. With this, inheritance can be replaced by object composition without sacriicing the possibility of static analysis, yet being more exible.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Inheritance Using Contracts & Object Composition, 1997

Normal class based code inheritance across component bound aries creates a dependency between the involved components To avoid this a speci cation of the inherited class must be part of the respective component s contract and the inheriting class must be speci ed with ref erence to this speci cation only With this inheritance can be replaced by object composition without sacri cing the possibil...

متن کامل

Extensible Code Contracts for Scala

Code contracts is a way to attribute the programs with formal the specifications, based on which the verification of those programs can be performed. The focus on software verification is increasing and the mainstream languages start to adopt this technique. Scala is an object oriented and functional programming language that is very expressive and has a strong type system. Hence, developing a ...

متن کامل

CS 617 Object Oriented Systems Lecture 7 Inheritance- Contracts, Extensions, Refinements Single Inheritance An Elaborate Example 3:30-5:00 pm Thu, Jan 24

class AbstractCollection { //concrete operations: remove: iterate over the collection and remove if you find it throws an UnsupportedOperationException if the iterator returned by iterator() does not implement remove. toArray: allocate a new array, iterate over the collection, insert objects in the array, return it contains: iterate over the collection to check whether it contains the given ele...

متن کامل

Building a Kermeta Compiler using Scala: an Experience Report

This paper presents an experience report of building a Kermeta compiler using Scala as a target language. Kermeta is a domain specific language inspired by languages such as Eiffel or OCL for specifying the operational semantics of metamodels. This engineering work, initially motivated by performance issues of our Kermeta interpreter, is an excuse to study and discuss some paradigm mismatches b...

متن کامل

Skala University of West Bohemia

The use of various forms of contracts, like preconditions, are increasingly receiving more attention within Microsoft. This talk describes the design of Spec#, an experimental superset of the language C#, including preand postconditions and object invariants. Spec# gives rise to dynamic checks of contracts. The contracts can also be checked statically using the automatic checker Boogie. The tal...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1997